import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.extra.qrcode.QrConfig;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import org.springframework.boot.test.context.SpringBootTest;

import java.awt.*;
import java.io.File;

@SpringBootTest
public class CodeUtil {

    public static void main(String[] args) {

        QrConfig config = new QrConfig();
        config.setErrorCorrection(ErrorCorrectionLevel.L);
        config.setBackColor(Color.BLUE);
        config.setHeight(500);
        config.setWidth(500);


        QrCodeUtil.generate("https://www.baidu.com",config, new File("D://就业//论文//毕业论文//qr.jpg"));

    }

}
